cmake_minimum_required(VERSION 3.10.2)
project(secure)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -fno-rtti -fvisibility=default -D_GNU_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections -D_GLIBC_MOCK")
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/base/src secureSrc)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/base/src/securec secureSrc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/base/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/base/src)

set(links rt)
add_library(secure SHARED ${secureSrc})
target_link_libraries(secure ${links})